package com.tcm.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tcm.entity.vo.TeacherListResult;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 社会化班级数据更新封装类
 * @author Guqier
 * @version 1.0
 * @date 2023/7/26 17:29
 */
@Data
public class SocialClazzUpdateDto {

    //社会化班级ID
    private Long id;

    //班级编号
    @NotBlank(message = "num不能为空")
    private String num;

    //班级名称
    @NotBlank(message = "name不能为空")
    private String name;

    //负责教师ID
    @NotNull(message = "teacherId不能为空")
    private Long teacherId;

    private String teacherName;// 教师名称，响应字段

    //社会化项目ID
    @NotNull(message = "projectId不能为空")
    private Long projectId;

    private String projectName;//社会化项目名称，响应字段

    @NotNull(message = "teacherIds不能为空")
    private List<Long> teacherIds;// 授课教师

    private List<TeacherListResult> teachers;// 授课教师，响应字段

    //班级有效期
    @NotNull(message = "invalidTime不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date invalidTime;

}
